package com.wxy.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 47868
 */
@Configuration
public class MyWebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor()).
                 excludePathPatterns("/*.css","/*.js","*.html","/lib/log","/lib/hello","/lib/book","/login/**","/error","/error.html",
                                     "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs","/api/books/**","/favicon.ico");
    }
}
